<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="hu" xml:lang="hu" dir="ltr">
<head>
<title>GN-Schweisstechnik</title>
<?php echo $javascript->link(array("cart","print"),true); ?>
<?php echo $scripts_for_layout; ?>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<?php
    echo $html->meta(
        'favicon.ico',
        '/ws/img/design/favicon.ico',
        array('type' => 'icon')
    );
?>
<?php 
    echo $html->css(array(
        "960",
        "reset",
        "text",
        "style"
    ));
?>

</head>
<body>
<div id="outerdiv">
    <div id="banner" class="container_16">
    <!-- Ide j�n a login r�sz -->   
        <div id="login">
            <?php 
            if ($session->check('Message.auth'))
                $session->flash('auth');
                
                echo $form->create('User',array('controller'=>'users','action'=>'login'));
                echo $form->input('email');
                echo $form->input('password');
                echo $form->end('Login');
            ?>
            <div class="registration">Registration</div>
        </div>  
    </div>
    <div id="router" class="container_16">
    <!-- �tvonalk�vet�s -->
        <div id="language">
            <div id="de_flage"><a href="#"><?php echo $html->image("design/de_flage.jpg"); ?></a></div>
            <div id="en_flage"><a href="#"><?php echo $html->image("design/en_flage.jpg"); ?></a></div>
        </div>
        
        <div id="router_content">
        
        </div>
        
    	<div id="search">
            <form action="http://www.google.com/search" method="get">
                <div class="clear-block">
                    <input type="hidden" value="UTF-8" name="ie"/>
                    <input type="hidden" value="UTF-8" name="oe"/>
                    <input type="hidden" value="www.gn-schweisstechnik.de" name="domains"/>
                    <input type="hidden" value="www.gn-schweisstechnik.de" name="sitesearch"/>
                    <input class="form-text" type="text" value="" maxlength="255" size="20" name="q"/>
                    <!--<a href="/kereses">Részletes</a>-->
                    <input class="form-submit" type="submit" value="Search" name="btnG"/>
                </div>
            </form>
        </div>
    </div>
    
    <div id="maindiv" class="container_16">
        
    	<div id="menu">
    	   <div class="menu_a_first">
            	<div class="menu_a ">
                    <?php echo $html->link(
                        __("Home",true),
                        array('controller'=>'pages','action'=>'home')
                        ); 
            	   ?>
            	</div>
        	</div>
        	<div class="menu_a_middle">
            	<div class="menu_a">
                    <?php echo $html->link(
                        __("Webshop",true),
                        array('controller'=>'categories','action'=>'index')
                        ); 
            	   ?>
            	</div>
        	</div>
        	<div class="menu_a_middle">
                <div class="menu_a">
                    <?php echo $html->link(
                        __("Impressum",true),
                        array('controller'=>'pages','action'=>'impressum')
                        ); 
            	   ?>
            	</div>
        	</div>
        	<div class="menu_a_middle">
                <div class="menu_a">
                    <?php echo $html->link(
                        __("Contact",true),
                        array('controller'=>'pages','action'=>'contact')
                        ); 
            	   ?>
            	</div>
        	</div>
        	<div class="menu_a_middle">
                <div class="menu_a_middle menu_a">
                    <?php echo $html->link(
                        __("Our business",true),
                        array('controller'=>'pages','action'=>'business')
                        ); 
            	   ?>
            	</div>
        	</div>
        	<div class="<?php echo ($is_logged)?'menu_a_middle':'menu_a_last';?>">
            	<div class="menu_a">
                    <?php echo $html->link(
                        __("GTC",true),
                        array('controller'=>'pages','action'=>'gtc')
                        ); 
            	   ?>
            	</div>
        	</div>
        	<?php if($is_logged):?>
                <div class="menu_a_middle">
                    <div class="menu_a">
                        <?php echo $html->link(
                            __("Show cart",true),
                            array('controller'=>'orders','action'=>'show_cart')
                            ); 
                       ?>
                    </div>
                </div>
                  <div class="menu_a_middle">
                    <div class="menu_a">
                        <?php echo $html->link(
                            __("My data editing",true),
                            array('controller'=>'users','action'=>'edit')
                            ); 
                       ?>
                    </div>
                </div>
                  <div class="menu_a_middle">
                    <div class="menu_a">
                        <?php echo $html->link(
                            __("Orders",true),
                            array('controller'=>'orders','action'=>'index')
                            ); 
                       ?>
                    </div>
                </div>
                  <div class="menu_a_last">
                    <div class="menu_a">
                        <?php echo $html->link(
                            __("Logout",true),
                            array('controller'=>'users','action'=>'logout')
                            ); 
                       ?>
                    </div>
                </div>
        	<?php endif; ?>
        </div>
        <?php if($display_cart):?>
        <div id="cart">
            <div id="cart_top">
        		<div id="cart_lang">
                    <?php echo $html->link(
                        __("Warenkorb",true),
                        array('controller'=>'orders','action'=>'show_cart')
                    ); 
        		    ?>
            	</div>
            </div>
            <div id="cart_in" onmouseover="cart_open()"  onmouseout="cart_close()">
                <div id="cart_content" >
                	<?php if(count($cart['items']) == 0): ?>
                        <?php __("Keinen Produkt in Warenkorb!"); ?>
                	<?php else: ?>
                	   <?php echo count($cart['items']);?> : <?php echo $cart['totalPrice'];?> €
                    <?php endif; ?>
                </div>
                <!-- Lenyíló doboz eleje -->
                <div id="cart_content_list">
                    <?php foreach ($cart['items'] as $pid=>$product):?>
                    <h6><?php echo $product['name'] ?></h6>
                        <?php foreach ($product['sizes'] as $sid=>$size):?>
                            <p>
                                <?php echo $size["quantity"] ?> x <?php echo $size["name"] ?> € =
                                <?php echo $size['price'] ?> €
                            </p>
                            <?php //$sub_total+=$product["price"] ?>
                        <?php endforeach;?>
                        <hr/>
                   <?php endforeach;?>
                </div>
                
            </div>
            <div id="cart_footer">
                <div>
                        Total : <?php echo $cart['totalPrice']; ?> €
                </div>   
            </div>
            <!--Lenyíló doboz vége -->
		</div>
		<?php endif; ?>
        
        <div id="main_container">
            
            <div id="main_content">
            
                <?php $session->flash(); ?>
                <?php echo $content_for_layout; ?>
			</div>
        </div>
        <!-- #e4e5e7 a szín-->
    <!-- Tartalom -->
    </div>
    <div id="print" onclick="printPage()">
        <?php
            echo $html->image("design/print_2.png",array("alt" => "Print"));
        ?>
    </div>
    <div id="footer" class="container_16">
    <!-- Footer men� -->
        <div id="footer_menu">
            <?php echo $html->link(__("Impressum",true),array('controller'=>'pages','action'=>'impressum'));?> | <?php echo $html->link(__("GTC",true),array('controller'=>'pages','action'=>'gtc'));?> | <?php echo $html->link(__("Contact",true),array('controller'=>'pages','action'=>'contact'));?> |   <?php echo $html->link(__("Webshop",true),array('controller'=>'categories','action'=>'index'));?>
        </div>
        <div id="footer_copyright"> GN Schweisstechnik © 2009 </div>
    
    </div>
</div>
</body>
</html>